<?php namespace Home\Controller; 

class MyselfController extends CommonController{

	//构造函数
	public function __init()
	{
		
	}
	public function index(){
		$o_number =  Db::table("360mall_order")->where("o_uid",$_SESSION['uid'])->field("o_id","o_time","o_total","o_number","o_status")->get();
	
		foreach ($o_number as $k => $v) {
			$o_number[$k]['goods']=Db::table("360mall_olist")->where("ol_oid",$v['o_id'])->field("ol_njum","ol_gid","ol_price")->get();
			foreach ($o_number[$k]['goods'] as $key => $value) {
			 $o_number[$k]['goods'][$key]['pic'] = Db::table("360mall_goods")->where("g_id",$value['ol_gid'])->pluck("g_pic");
				$o_number[$k]['goods'][$key]['gname'] = Db::table("360mall_goods")->where("g_id",$value['ol_gid'])->pluck("g_name");
			}
		}
		View::with("o_number",$o_number);
		View::make();
	}
	
	
}